<div class="st-cp-pg-home">
     
    <?php /* ?><section><?php */ ?>
        <div id="ctn_inicial" class="conteudo st-cp-pg-inicil">
            <div class="login">
                <a href="<?php echo $this->urlbase; ?>" class="g_pagina" pagina="logo"><h1 class="logo"></h1></a>
                <div class="form"> <?php /*
                    <form method="post" target="_blank" action="http://idology.dnsalias.com:81/apps/idology/loginIframe.seam" enctype="application/x-www-form-urlencoded">
                        <h2>Área do Cliente</h2>
                        <input type="text" name="username" placeholder="usuário" value="" >
                        <input type="password" name="password" placeholder="senha" value="" >
                        <button type="submit" >entrar</button>
                        <?php // <a href="#" class="esqueci">esqueci minha senha</a> ?>
                    </form> */ ?>
                    <iframe src="http://idology.dnsalias.com:81/apps/idology/loginIframe.seam" style="width: 165px;height: 110px;margin-top: -5px;border: none;"></iframe>                
                    <a href="https://si-web.sicredi.com.br/boletoweb/BoletoWeb.servicos.Index.task" class="g_pagina" pagina="via_boletos" target="_black">2&deg; Via de Boletos</a>
                </div>
            </div>
        <?php 
        $link = '';
        $posicao = 0;
        foreach($this->fullbanner as $key => $banner){
            $img = glob('public/upload/fullbanner/'.$banner['BAN_ID'].'.*');
            @$img = $img[0];
            $style = '';
            $class = '';

            if($key > 0) $style = 'display: none;';
            if($key == 0) $class = 'class="action"';

            $alink .= '<a '.$class.' id="lnkb'.$key.'" itemref="bimg'.$key.'" itemid="'.$key.'" href="javascript:void(0)"></a>';
            $imgs .= '<img id="bimg'.$key.'" src="'.$this->urlbase.'/'.str_replace('.','_sld.',$img).'" style="margin-left: '.$posicao.'px" >';
            $posicao += 34; 
        ?>
                <a href="<?php echo $banner['BAN_LNK'];?>" class="g_pagina go_pag" pagina="<?php echo str_replace('#', '', $banner['BAN_LNK']);?>">
                    <div id="banner<?php echo $key; ?>" class="banner" style="background-image: url('<?php echo $this->urlbase.'/'.$img; ?>');<?php echo $style; ?>"></div>
                </a>
            <?php } ?>
            <?php /* <a href="javascript:void(0)" class="seta lft" ><</a> */ ?>
            <?php /* <a href="javascript:void(0)" class="seta drt">></a> */ ?>
            <div class="lnkitg">
                <div class="imgs"><?php echo $imgs; ?></div>
                <?php echo $alink; ?>
            </div>
        </div>
    <?php /* ?></section><?php */ ?>
    
    
    <?php /* ?><section><?php */ ?>
        <div id="ctn_sobre" class="conteudo st-cp-pg-sobre">
            <div class="tl"><span><?php echo $this->empresa['EMP_NOM']; ?></span></div>
            <p><?php echo str_replace('#', '<br>',$this->empresa['EMP_TXT']); ?></p>
            <div class="slider_empresa"><ul>
            <?php
                $img_emp = glob('public/upload/empresa/*_tb.*');
                foreach ($img_emp as $src) {
            ?>
                <li><img src="<?php echo $this->urlbase.'/'.$src; ?>" /></li>
            <?php } ?>
                </ul>
            </div>
            <a href="#inicial" class="seta_sub" ></a>
        </div>    
    <?php /* ?></section><?php */ ?>
    
    
    <?php /* ?><section><?php */ ?>
        <div id="ctn_rastreadores" class="conteudo st-cp-pg-rastreadores">
            <div class="tl"><span><?php echo $this->rastreadores['RAS_NOM']; ?></span></div>
            <p><?php echo $this->rastreadores['RAS_TXT']; ?></p>
            <ul class="itens">
            <?php
                foreach($this->caracteristicas as $car){ 
                    $imgs_car = glob('public/upload/caracteristicas/'.$car['CAR_ID'].'.*');
                    foreach ($imgs_car as $src) $img_car = $src;
            ?>
                <li>
                    <img src="<?php echo $img_car; ?>" />
                    <div class="nm"><?php echo $car['CAR_NOM']; ?></div>
                    <div class="txt"><?php echo $car['CAR_TXT']; ?></div>
                </li>
            <?php }?>
            </ul>

            <div class="saiba_mais">

                <ul class="sm_itens">
                    <li><div class="sm_tl">Saiba mais</div></li>
                <?php
                    foreach($this->produtos as $pro){
                        $img_pro = '';
                        $imgs_pro = glob('public/upload/produto/'.$pro['PRO_ID'].'_btn.*');
                        if(isset($imgs_pro[0]))
                        foreach($imgs_pro as $src) $img_pro = $src;
                ?>
                    <li><a href="#pro<?php echo $pro['PRO_ID']; ?>"  class="g_pagina" pagina="pro<?php echo $pro['PRO_ID']; ?>"><img src="<?php echo $img_pro; ?>" /></a></li>
                <?php } ?>
                </ul>
            </div>
            <a href="#sobre" class="seta_sub" ></a>
        </div>
    <?php /* ?></section><?php */ ?>
    
    <?php
    $list_pro = array();
    foreach($this->produtos as $key => $pro){
        $list_pro[$key] = $pro['PRO_ID'];
        $img_pro = '';
        $imgs_pro = glob('public/upload/produto/'.$pro['PRO_ID'].'_ico.*');
        if(isset($imgs_pro[0])) foreach ($imgs_pro as $src) $img_pro = $src;
        
    ?>
    <?php /* ?><section><?php */ ?>
        <div id="ctn_pro<?php echo $pro['PRO_ID']; ?>" class="conteudo st-cp-pg-produtos">
            <div class="tl"style="background: url('<?php echo $img_pro; ?>') top center no-repeat;">
                <span><?php echo $pro['PRO_NOM']; ?></span>
            </div>
            <div class="cp_content_txt">
                <div class="col_des">
                    <?php
                    $img_pro = '';
                    $imgs_pro = glob('public/upload/produto/'.$pro['PRO_ID'].'.*');
                    if(isset($imgs_pro[0])) foreach ($imgs_pro as $src) $img_pro = $src;
                    ?>
                    <img src="<?php echo $img_pro; ?>" />
                    <div class="st_cima"></div>
                    <div class="cd_txt">
                        <?php echo $pro['PRO_TXT']; ?>
                    </div>
                </div>
                <div class="col_txt">
                    <ul class="itens_pro">
                    <?php
                        $query = 'SELECT * FROM CARACTERISTICAS_PRO WHERE PRO_ID = '.$pro['PRO_ID'].'  and CRP_STA = 1 ORDER BY CRP_ORD ASC';
                        $car_pro = $this->db->fetchAll($query);
                        foreach($car_pro as $car_p){
                            $img_carp = '';
                            $imgs_carp = glob('public/upload/caracteristicaspro/'.$car_p['CRP_ID'].'.*');
                            foreach ($imgs_carp as $src) $img_carp = $src;
                    ?>
                        <li>
                            <img src="<?php echo $img_carp; ?>" />
                            <div class="nm"><?php echo $car_p['CRP_NOM']; ?></div>
                            <div class="txt"><?php echo $car_p['CRP_TXT']; ?></div>
                        </li>
                    <?php } ?>
                    </ul>
                    <?php 
                        $query = 'SELECT * FROM PERGUNTAS_PRO WHERE PRO_ID = '.$pro['PRO_ID'].' and PRP_STA = 1 ORDER BY PRP_ORD ASC';
                        $per_pro = $this->db->fetchAll($query);
                        foreach($per_pro as $key => $per_p){
                    ?>

                    <?php if($key == 0) { ?>
                    <div class="ct_tl">Perguntas Frequentes</div>
                    <?php } ?>

                    <div class="ct_per">
                        <?php echo $per_p['PRP_NOM']; ?>
                    </div>
                    <div class="ct_res">
                        <?php echo $per_p['PRP_TXT']; ?>
                    </div>
                    <?php } ?>
                    <?php
                        $imgs_pro = glob('public/upload/produto/'.$pro['PRO_ID'].'_btn.*');
                        if(isset($imgs_pro[0]))
                        foreach($imgs_pro as $src) $img_popup = $src;
                    ?>
                    <a href="javascript:void(0)" class="adquira g_pagina" pagina="adquira_pro<?php echo $pro['PRO_ID']; ?>" itemid="<?php echo $pro['PRO_ID']; ?>" src="<?php echo $img_popup; ?>" >registre seu interesse</a>

                    <div class="saiba_mais">

                        <ul class="sm_itens">
                        <?php
                            foreach($this->produtos as $pro){
                                $img_pro = '';
                                $imgs_pro = glob('public/upload/produto/'.$pro['PRO_ID'].'_btn.*');
                                if(isset($imgs_pro[0]))
                                foreach($imgs_pro as $src) $img_pro = $src; 
                        ?>
                            <li><a href="#pro<?php echo $pro['PRO_ID']; ?>" class="g_pagina" pagina="pro<?php echo $pro['PRO_ID']; ?>"><img src="<?php echo $img_pro; ?>" /></a></li>
                        <?php } ?>
                        </ul>
                    </div>

                </div>
            </div>
            <?php if($key == 0){?>
            <a href="#rastreadores" class="seta_sub"></a>
            <?php } else { ?>
                <a href="#pro<?php echo $list_pro[($key - 1)]; ?>" class="seta_sub" ></a>
            <?php } ?>
        </div>
    <?php /* ?></section><?php */ ?>  
    <?php } ?>
    
    <a class="fc_popup" href="#popup"></a>
    <div id="popup" class="ctn-popup" style="display: none;">
        <div class="barra">
            <span>Adquira já seu rastreador</span>
            <img id="popup_logo" src="<?php echo $this->urlbase; ?>/public/media/images/logo_menu.png" />
        </div>
        <img id="popup_img" src="" /> 
        <form id="form_produto" class="formpdr" method="post">
           <input type="hidden" id="frm_produto" name="produto" value="">
           <input type="text" name="nome" placeholder="nome" value="" required="">
           <input type="text" name="email" class="email" placeholder="e-mail" value="" required="">
           <input type="text" name="telefone" class="telefone" placeholder="telefone" value=""  required="">
           <input type="text" name="cidade" placeholder="cidade" value="" required="">
           <textarea rows="3" name="mensagem" placeholder="Mensagem" required="" ></textarea>
           <button type="submit" name="enviar" class="g_pagina" pagina="form_interrese">enviar</button>
       </form>
    </div>
    
    
    <?php /* ?><section><?php */ ?>
        <div id="ctn_sistema" class="conteudo st-cp-pg-sistema">
            <div class="tl"><span><?php echo $this->osistema['SIS_NOM']; ?></span></div>
            <p><?php echo $this->osistema['SIS_TXT']; ?></p>
            <div class="video">
                <?php //echo $this->osistema['SIS_LNKVID']; ?>
                <?php /* */ ?>
                <div id="mediaplayer"></div>
                <script type='text/javascript' src='<?php echo $this->urlbase; ?>/public/media/js/mediaplayer/jwplayer.js'></script>
                <script type="text/javascript">
                        jwplayer("mediaplayer").setup({
                                flashplayer: "<?php echo $this->urlbase; ?>/public/media/js/mediaplayer/player.swf",
                                file: "<?php echo $this->urlbase; ?>/public/media/sistema.m4v",
                                width: 470,
                                height: 320
                        });
                </script>
                 
                 
            </div> 
            <a href="#pro<?php echo $list_pro[$key]; ?>" class="seta_sub" ></a>
        </div>
    <?php /* ?></section><?php */ ?>
    
    <?php /* ?><section><?php */ ?>
        <div id="ctn_dicas" class="conteudo st-cp-pg-dicas">
            <div class="tl"><span>Dicas</span></div>
            <div class="dicas">

                <?php
                    foreach($this->dicas as $dic){ 
                        $img_dic = '';
                        $img_dics = glob('public/upload/dicas/'.$dic['DIC_ID'].'.*');
                        if(isset($img_dics[0]))
                        foreach($img_dics as $src) $img_dic = $src;
                ?>
                <div class="dic_item">
                    <img src="<?php echo $img_dic; ?>" />
                    <div class="st_cima"></div>
                    <div class="dic_tl">
                        <?php echo $dic['DIC_NOM']; ?>
                    </div>
                    <div class="dic_txt">
                        <?php echo $dic['DIC_TXT']; ?>
                    </div>
                    <a href="http://<?php echo $dic['DIC_LNK']; ?>" target="_blank" >abrir link</a>
                </div>
                <?php } ?>

            </div>
            <a href="#sistema" class="seta_sub" ></a>
        </div>
    <?php /* ?></section><?php */ ?>
    
    
    
    <?php /* ?><section><?php */ ?>
        <div id="ctn_contato" class="conteudo st-cp-pg-contato">
            <div class="tl"><span>Contato</span></div>
            <div class="contato">
                <div id="mapa"></div>
                <div class="ct_form">
                    <div class="ct_content">
                        <div class="endereco">
                            <a href="<?php $this->urlbase?>"><img src="<?php $this->urlbase?>public/media/images/logo_rodape.png" /></a>
                            <ul class="redes">
                                <?php if(strlen($this->parametros['PAR_FAC']) > 5){ ?>
                                <li><a href="<?php echo $this->parametros['PAR_FAC']; ?>" target="_blank"><img src="<?php $this->urlbase?>public/media/images/ic_facebook.png" /></a></li>
                                <?php } ?>
                                <?php if(strlen($this->parametros['PAR_TWI']) > 5){ ?>
                                <li><a href="<?php echo $this->parametros['PAR_TWI']; ?>" target="_blank"><img src="<?php $this->urlbase?>public/media/images/ic_twitter.png" /></a></li>
                                <?php } ?>
                            </ul>
                            <div class="end"><?php echo str_replace('#','<br/>',$this->parametros['PAR_END']); ?> <span class="tel"><?php echo  str_replace(array('54'),array('<span class="pre">54</span>'),$this->parametros['PAR_TEL']); ?></span></div>
                        </div>
                        <div class="formulario">
                            <form id="form_contato" method="post">
                                <input type="text" name="nome" placeholder="nome" value="" required="">
                                <input type="text" name="email" class="email" placeholder="e-mail" value="" required="">
                                <input type="text" name="assunto" placeholder="assunto" value="" required="">
                                <textarea rows="3" name="mensagem" required=""></textarea>
                                <button type="submit" name="enviar" class="g_pagina" pagina="form_contato">enviar</button>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>       
    <?php /* ?></section><?php */ ?>
    
</div>
<?php if(strlen($this->pagina) > 0){ ?>
<script> setTimeout(function(){ scrollPagina('<?php echo $this->pagina;?>')}, 1000);</script>
<?php } ?>
